import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.ApplicationContext;
import xyz.weizhi.pojo.Student;
import xyz.weizhi.pojo.User;

/**
 * @Author milian
 * @Date 2021/9/4 0004 17:18
 */
public class test1 {
    public static void main(String[] args) {
        ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
        Student student = (Student) context.getBean("student");
        System.out.println(student.toString());
        User user = context.getBean("user2", User.class);
        System.out.println(user);
    }
}
